package cuit.cx.json;

import org.json.JSONException;
import org.json.JSONObject;

import cuit.cx.handlemodel.ResultHandle;

public class ResultHelper {
	
	public ResultHandle doAnaylysis(String data) throws JSONException  {
	
		JSONObject jsonObject = new JSONObject(data);
		ResultHandle resultHandle = new ResultHandle();
		resultHandle.setResult(jsonObject.getInt("result"));
		resultHandle.setId(jsonObject.getInt("id"));
		
		return resultHandle;
	}

}
